﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SecEdit.aspx.cs" Inherits="Webcar.Sec.SecEdit" Title="无标题页" %>

<%@ Register Assembly="WebPager" Namespace="Zw.Control" TagPrefix="cc1" %>

<%@ Register Src="../Controls/NaviBar.ascx" TagName="NaviBar" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>事故信息编辑</title>
</head>
<script language = "javaScript" src ="../JavaScript/default.js" type="text/javascript"></script>
<body >
    
    <form id="form1" runat="server">
    <div id="SecEdit" >
    <div style="display:none">
    <asp:TextBox ID="tbCarNo" runat="server"></asp:TextBox>
    <asp:TextBox ID="tbDriverID" runat="server"></asp:TextBox>
    </div>
        <div class="content" >
        <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <uc1:NaviBar ID="NaviBar1" runat="server" />
            <div class="tips">
                <span>提示:带*号的项目必须录入</span>&nbsp;&nbsp;<asp:Label ID="lblError" runat="server"></asp:Label>
                </div>
            <table id = "t" width="100%" cellspacing="1" cellpadding="1" bgcolor="#006699" border="0">
                <tr class="tableAlterItems">
                    <td class="tdleft" >
                        *车辆牌照：</td>
                    <td class="tdright">
                        
                        <asp:TextBox ID="tbRecordNo" Width="97%" runat="server"></asp:TextBox></td>
                    <td class="tdleft" >
                        *驾驶员：</td>
                    <td class="tdright">
                        <asp:TextBox ID="tbDriverName" runat="server" Width="80%"></asp:TextBox>
                        
                        <a href="#" onclick="javascript:openSelectWindow()">选择</a>&nbsp;&nbsp;
                        
                        </td>
                </tr>
                <tr class="tableAlterItems">
                    <td class="tdleft" >
                        *所属单位：</td>
                    <td class="tdright">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                        <asp:DropDownList ID="ddlDept" Width="100%" runat="server" OnSelectedIndexChanged="ddlDept_SelectedIndexChanged" AutoPostBack="True">
                        </asp:DropDownList>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td class="tdleft" >
                        下级单位：</td>
                    <td class="tdright">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                        <asp:DropDownList ID="ddlChildDept" Width="100%" runat="server">
                        </asp:DropDownList>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlDept" EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr class="tableAlterItems">
                    <td class="tdleft" >
                        *事故日期：</td>
                    <td class="tdright">
                        <cc1:Calendar ID="dtSecDate" runat="server" Width="97%"></cc1:Calendar></td>
                    <td class="tdleft" >
                        *是否记入统计：</td>
                    <td class="tdright">
                        <asp:DropDownList ID="ddlReport" runat="server" Width="99%">
                            <asp:ListItem Value="T">是</asp:ListItem>
                            <asp:ListItem Value="F">否</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                
                <tr class="tableAlterItems">
                    <td class="tdleft" >
                        *航程起至：</td>
                    <td class="tdright">
                        <asp:TextBox ID="tbFromTo" runat="server" Width="97%"></asp:TextBox></td>
                    <td class="tdleft" >
                        *事故地点：</td>
                    <td class="tdright">
                        <asp:TextBox ID="tbPlace" Width="97%" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr class="tableAlterItems">
                    <td class="tdleft" >
                        *事故类型：</td>
                    <td class="tdright" >
                        <asp:DropDownList ID="ddlSecKind" runat="server" Width="100%">
                        </asp:DropDownList></td>
                    <td class="tdleft"  >
                        *事故责任：</td>
                    <td class="tdright" >
                        <asp:DropDownList ID="ddlSecDuty" runat="server" Width="100%">
                        </asp:DropDownList></td>
                </tr>
                <tr class="tableAlterItems">
                    <td class="tdleft" >
                        *事故程度：</td>
                    <td class="tdright" >
                        <asp:DropDownList ID="ddlSecType" runat="server" Width="100%">
                        </asp:DropDownList></td>
                    <td class="tdleft"  >
                        轻伤：</td>
                    <td class="tdright" >
                        <asp:TextBox ID="tbInjuryEasy" Width="97%"  runat="server"></asp:TextBox></td>
                </tr>
                
                <tr class="tableAlterItems">
                    <td class="tdleft"   >
                        重伤：</td>
                    <td >
                        <asp:TextBox ID="tbInjuryHeavy" runat="server" Width="97%"></asp:TextBox></td>
                    <td class="tdleft"  >
                        死亡：</td>
                    <td >
                        <asp:TextBox ID="tbDied" runat="server" Width="97%"></asp:TextBox></td>
                </tr>
                
                <tr class="tableAlterItems">
                    <td class="tdleft"   >
                        *事故概况：</td>
                    <td colspan="3"  align="left">
                        <asp:TextBox ID="tbCause" runat="server" Rows="6" TextMode="MultiLine" Width="99%"></asp:TextBox></td>
                    
                </tr>
                <tr class="tableAlterItems">
                <td class="tdleft"   >
                    责任认定：</td>
                <td colspan="3" align="left">
                    <asp:TextBox ID="tbRemark" runat="server" Width="99%" Rows="3" TextMode="MultiLine"></asp:TextBox></td>
                    
                </tr>
                <tr class="tableAlterItems">
                    <td class="tdleft"  >
                        达成协议：</td>
                    <td colspan="3" align="left" >
                        <asp:TextBox ID="tbProtocal" Width="99%" runat="server" Rows="3" TextMode="MultiLine"></asp:TextBox></td>
                </tr>
            </table>
            <br />
            <div class="footer">
                <div class="e">
                    <hr class="line_blue" />
                </div>
                <asp:Button ID="btnSave" runat="server" Text="保存数据" SkinID="default_button" Width="60px" OnClick="btnSave_Click" />
                 <input id="Button2" type="button" value="返回" style="width:60px" class="button" onclick="javascript:history.back(1);" /></div>
        </div>
    </div>
    </form>
</body>
</html>

<script type="text/javascript" language="javascript">
function openSelectWindow()
{
    var ret = openDialog("../Driver/SelectDriver.aspx?query=",470, 360);
    if(ret!=undefined)
    {
        var pos = ret.indexOf(",");
        var man_code = ret.substring(0,pos);
        var man_name = ret.substring(pos+1);
        
        document.getElementById("tbDriverID").value = man_code.toString();
        document.getElementById("tbDriverName").value = man_name.toString();
    }
}
</script>